import request from '@/utils/request'

// 查询型材基础数据列表
export function listSeries(query) {
  return request({
    url: '/line/configure/series/list',
    method: 'get',
    params: query
  })
}

// 查询型材基础数据详细
export function getSeries(id) {
  return request({
    url: '/line/configure/series/' + id,
    method: 'get'
  })
}

// 新增型材基础数据
export function addSeries(data) {
  return request({
    url: '/line/configure/series',
    method: 'post',
    data: data
  })
}

// 修改型材基础数据
export function updateSeries(data) {
  return request({
    url: '/line/configure/series',
    method: 'put',
    data: data
  })
}

// 删除型材基础数据
export function delSeries(id) {
  return request({
    url: '/line/configure/series/' + id,
    method: 'delete'
  })
}

// 导出型材基础数据
export function exportSeries(query) {
  return request({
    url: '/line/configure/series/export',
    method: 'get',
    params: query
  })
}
// 下载用户导入模板
export function importTemplate() {
  return request({
    url: '/line/configure/series/importTemplate',
    method: 'get'
  })
}
// 刷新缓存
export function refreshRedis() {
  return request({
    url: '/line/configure/series/refreshRedis',
    method: 'get'
  })
}
